/**
 * Descriptions：
 * <p>
 * Author：ChenME
 * Date：2017/6/26
 * Email：ibelieve1210@163.com
 */
import React, {Component} from 'react';
import {
    StyleSheet,
    Text,
    View,
    ScrollView,
} from 'react-native';

import {CommCellMine} from '../common/CMECommCellMine';
import {MineMidView} from './CMEMineMidView';
import MineHeaderView from './CMEMineHeaderView';

export default class CMEMine extends Component {
    render() {
        return (
            <ScrollView
                contentContainerStyle={styles.scrollViewContentStyle}
                //iOS属性，完成iOS粘性效果
                contentInset={{top: -300}}
                contentOffset={{y: 300}}
            >
                <View >

                    <MineHeaderView
                        userCoverUri="see"
                        userName="电商平台"
                        userLevelIconUri="avatar_vip"
                        shopCardCnt={100}
                        commentsCnt={121}
                        collectionCnt={51}
                    />
                    <View style={styles.itemArea}>
                        <CommCellMine
                            leftIconName="collect"
                            leftText="我的订单"
                            rightText="查看全部订单"
                        />
                        <MineMidView/>
                    </View>

                    <View style={styles.itemArea}>
                        <CommCellMine
                            leftIconName="pay"
                            leftText="钱包"
                            rightText="账户余额：120元"
                        />
                        <CommCellMine
                            leftIconName="like"
                            leftText="抵用券"
                            rightText="0"
                        />
                    </View>

                    <View style={styles.itemArea}>
                        <CommCellMine
                            leftIconName="card"
                            leftText="积分商城"
                        />
                    </View>

                    <View style={styles.itemArea}>
                        <CommCellMine
                            leftIconName="new_friend"
                            leftText="今日推荐"
                            rightIconName="me_new"
                        />
                    </View>

                    <View style={styles.itemArea}>
                        <CommCellMine
                            leftIconName="draft"
                            leftText="我要合作"
                            rightText="轻松开店，招财进宝"
                        />
                    </View>
                </View>
            </ScrollView>
        );
    }
}

const styles = StyleSheet.create({
    scrollViewContentStyle: {
        backgroundColor: '#e8e8e8'
    },

    itemArea: {
        marginTop: 15,
    },
    // buttonGray: {
    //     borderWidth: 1,
    //     marginTop: 10,
    //     alignSelf: 'center',
    //     paddingHorizontal: 3,
    //     paddingVertical: 5,
    //     borderRadius: 4,
    //     color: '#333',
    //     backgroundColor: '#fff',
    // },
});